package com.zw.pm.module.integrate.interactive;


import com.zw.pm.gen.entity.Project;
import com.zw.pm.module.board.multi.MultiModel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Description: 互动专区 服务层
 *
 * @Author: China.sgl
 * @Date: 2019/9/16 09:11
 */
@Service
public class InteractiveService {

    @Autowired
    private MessageDao messageDao;

    /**
     * 根据条件查询项目
     *
     * @param messageModel 查询条件
     * @return 项目列表数据
     */
    public List<Project> findProject(MessageModel messageModel){
        return messageDao.findHaveMessageProject(messageModel);
    }

    /**
     * 根据项目ID 查询互动消息
     *
     * @param id 项目ID
     * @return list
     */
    public List<MessageModel> findMessageByProjectId(Integer id) {
        return messageDao.findByProjectId(id);
    }
}
